<div class="box">
    <div class="item" >
        <div class="head" >
            <div class="left">
                <div class="photo">
                    <imageBox :src="value.headImg"></imageBox>
                </div>
                <div class="text">
                    <p>名称：{{value.nickName}}</p>
                    <p>AppID: {{value.appId == null ? '无' : value.appId}}</p>
                </div>
            </div>
            <div class="right">
                <el-button size="medium" type="primary" v-if="value.templateDetails" @click="button('update')" >更新记录</el-button>
                <el-button size="medium" type="primary" v-if="value.templateDetails"   @click="button('experience')" >体验版本</el-button>
                <el-button size="medium" type="primary"  @click="button('again')" >重新授权</el-button>
                <el-button size="medium" type="primary"  v-if="value.templateDetails"   @click="button('trial')" >提审版本</el-button>
            </div>
       </div>
    </div>
    <div class="item" v-if="types == 'wxapp'">
        <div class="main" >
            <div class="left">
                <div class="top">
                    线上版本
                </div>
                <div class="template" v-if="value.releaseDetails">
                    <p>名称: {{ value.releaseDetails.nickName }}</p>
                    <p>版本生成时间: {{ timeStamp(value.releaseDetails.codeCommitTime) }}</p>
                    <p>发布时间: {{ timeStamp(value.releaseDetails.releaseTime) || '-' }}</p>
                </div>
                <div  v-else>
                    暂无线上版本
                </div>
            </div>
            <template  v-if="value.releaseDetails" >
                <div class="right">
                    <div v-if="!wxAppletUrl" class="default" >{{wxAppletTips}}</div>  
                    <imageBox v-else  :src="wxAppletUrl"></imageBox>
                </div>
            </template>
         </div>
    </div>
    <div class="item" v-if="value.auditDetails">
        <div class="tabs" >
            <div class="left" >
                  <div style="padding-left: 15px;">
                      <div>版本号：{{value.auditDetails.userVersion}}</div>
                      <div>名称：{{value.auditDetails.templateName}}</div>
                  </div>
                  <div >
                    <!-- 1代码已上传 2已提交审核 3待发布 4已发布 5已撤销审核 6失败 -->
                    <div class="horizontal">
                            <div  class="item">
                                <div class="sign" >
                                    <div class="number">1</div>
                                    <h3>提交审核版本</h3>
                                </div>
                                <div class="describe">
                                    <p>更新版本需要提交微信审核才可生效</p>
                                    <p v-if="value.auditDetails.codeCommitTime">{{  timeStamp(value.auditDetails.codeCommitTime) }}</p>
                                </div>
                            </div>
                            <div  class="item">
                                <div class="sign" >
                                    <div class="number">2</div>
                                    <h3>微信审核</h3>
                                    <el-button size="small" type="primary" v-if="value.auditDetails.auditStatus == 2"  @click="button('revoke')" >审核撤销</el-button>
                                </div>
                                <div class="describe">
                                    <p>审核一般需要1-7天，请耐心等待</p>
                                    <template v-if="value.auditDetails.auditStatus == 2" >
                                        <p>进行中</p>
                                    </template>
                                    <template v-else-if="value.auditDetails.auditStatus == 5" >
                                        <p>已撤销审核</p>
                                    </template>
                                    <template v-else-if="value.auditDetails.auditStatus == 6" >
                                        <p>失败</p>
                                        <p>原因: {{value.auditDetails.errmsg}}</p>
                                    </template>
                                    <template v-else >
                                       <p>{{ timeStamp(value.auditDetails.auditTime) }}</p>
                                    </template>
                                </div>
                            </div>
                            <div  class="item">
                                <div class="sign" >
                                    <div class="number">3</div>
                                    <h3>发布小程序</h3>
                                    <el-button size="small" type="primary" v-if="value.auditDetails.auditStatus == 3"  @click="button('publish')" >发布小程序</el-button>
                                </div>
                                <div class="describe">
                                    <p>审核通过正式发布</p>
                                    <template v-if="value.auditDetails.auditStatus == 3" >
                                        <p>待发布</p>
                                    </template>
                                    <template v-if="value.auditDetails.auditStatus == 4" >
                                        <p>{{ timeStamp(value.auditDetails.releaseTime) }}</p>
                                    </template>
                                </div>
                            </div>
                    </div>
                  </div>
            </div>
            <div class="right" >
                    <div class="default" v-if="show" @click="barcode">
                        <p>点击体验二维码</p>
                    </div>
                    <template v-else >
                        <div v-if="!imgUrl"  class="default" >加载中</div>  
                        <imageBox v-else  :src="imgUrl"></imageBox>
                    </template>
            </div>
        </div>
         
    </div>
</div>